home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-installer.exe / bin / pywintypes.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  2KB  |  63 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4. import imp
  5. import sys
  6. import os
  7.  
  8. def __import_pywin32_system_module__(modname, globs):
  9.     if not sys.platform.startswith('win32'):
  10.         for ext, mode, ext_type in imp.get_suffixes():
  11.             if ext_type == imp.C_EXTENSION:
  12.                 for path in sys.path:
  13.                     look = os.path.join(path, 'lib' + modname + ext)
  14.                     if os.path.isfile(look):
  15.                         mod = imp.load_module(modname, None, look, (ext, mode, ext_type))
  16.                         globs.update(mod.__dict__)
  17.                         return None
  18.                 
  19.         raise ImportError('No dynamic module ' + modname)
  20.     for suffix_item in imp.get_suffixes():
  21.         if suffix_item[0] == '_d.pyd':
  22.             suffix = '_d'
  23.             break
  24.             continue
  25.         suffix = ''
  26.         filename = '%s%d%d%s.dll' % (modname, sys.version_info[0], sys.version_info[1], suffix)
  27.         if hasattr(sys, 'frozen'):
  28.             for look in sys.path:
  29.                 if os.path.isfile(look):
  30.                     look = os.path.dirname(look)
  31.                 found = os.path.join(look, filename)
  32.                 if os.path.isfile(found):
  33.                     break
  34.                     continue
  35.                 raise ImportError("Module '%s' isn't in frozen sys.path %s" % (modname, sys.path))
  36.     import _win32sysloader as _win32sysloader
  37.     found = _win32sysloader.GetModuleFilename(filename)
  38.     if found is None:
  39.         found = _win32sysloader.LoadModule(filename)
  40.     if found is None and os.path.isfile(os.path.join(sys.prefix, filename)):
  41.         found = os.path.join(sys.prefix, filename)
  42.     
  43.     if found is None and os.path.isfile(os.path.join(os.path.dirname(__file__), filename)):
  44.         found = os.path.join(os.path.dirname(__file__), filename)
  45.     
  46.     if found is None:
  47.         raise ImportError("No system module '%s' (%s)" % (modname, filename))
  48.     old_mod = sys.modules[modname]
  49.     mod = imp.load_dynamic(modname, found)
  50.     if sys.version_info < (3, 0):
  51.         if not sys.modules[modname] is old_mod:
  52.             raise AssertionError
  53.         if not None is old_mod:
  54.             raise AssertionError
  55.     if not sys.modules[modname] is not old_mod:
  56.         raise AssertionError
  57.     if not None.modules[modname] is mod:
  58.         raise AssertionError
  59.     sys.modules[modname] = None
  60.     globs.update(mod.__dict__)
  61.  
  62. __import_pywin32_system_module__('pywintypes', globals())
  63.